var frisby = require('frisby');

frisby.create('舱单接口')
  .post('http://192.168.247.88:9090/hub/manifest/getWebInsertLoad', {
      'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
      'strFlightSTD':'2012-04-06 08:00',//计划起飞北京时间	2012-04-06 08:00 不允许为空
      'strLoadSheetType':'LSP',//舱单类型	LSP代表正常宽屏舱单，LDP代表窄屏舱单，允许为空
      'strFlightNo':'HU 2354',//航班号	HU XXXX，不允许为空
      'strApCode':'B9562',//机号	BXXXX 不允许为空
      'strDepstn':'HAK',//起飞机场三字码	HAK，不允许为空
      'strArrstn':'PEK'//目的机场三字码	PEK，允许为空
    })


    // .inspectJSON()
  .expectJSONTypes({
      'result': {
         "value": String,
         "loadSheetInfo-list": Array
       }})

  .expectJSONTypes('result.loadSheetInfo-list.?', {
        "cndtFlightDate":String,//"2013-07-04T00:00:00+08:00",
        "cnvcFlightNo":String,//"HU7081",
        "cnvcApCode":String,//"B5579",
        "cnvcDepstn":String,//"HAK",
        "cnvcArrstn":String,//"PEK",
        "cnvcContent":String,//"",
        "cnvcHLD1":String,//"1534",
        "cnvcHLD2":String,//"0",
        "cnvcHLD3":String,//"0",
        "cnvcHLD4":String,//"2143",
        "cnvcHLD5":String,//"0",
        "cniPassengerWeight":String,//"8794",
        "cniPassengerAdults":String,//"119",
        "cniPassengerChild":String,//"6",
        "cniPassengerBaby":String,//"1",
        "cniPassengerCount":String,//"126",
        "cnvcDOIIndex":String,//"49.49",
        "cnvcDLIIndex":Array,//[],
        "cnvcLIZFWIndex":Array,//[],
        "cnvcLITOWIndex":Array,//[],
        "cnvcLILAWIndex":Array,//[],
        "cniOtherBagWeight":String,//"1143",
        "cniOtherBagpCount":String//"103"
      })
    .expectStatus(200)
.toss();
